<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='ttbl' /></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
    <style>
        html {
            background: #fff;
        }
    </style>
</head>

<body>
<div class="layui-container">
    <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">

        <form:form commandName="billLading" class="layui-form" id="form">

            

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='ddxx' /></legend>
            </fieldset>

            <table class="layui-table">
                <tbody>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='ddbh' /></td>
                    <td width="70%" style="border-color: black;">${billLading.orderNo}</td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='ddzt' /></td>
                    <td width="70%" style="border-color: black;">
                        <c:choose>
                            <c:when test="${billLading.status eq 1}"><fmt:message key='dddfk' /></c:when>
                            <c:when test="${billLading.status eq 2}"><fmt:message key='dddfh' /></c:when>
                            <c:when test="${billLading.status eq 3}"><fmt:message key='dddsh' /></c:when>
                            <c:when test="${billLading.status eq 4}"><fmt:message key='dddpj' /></c:when>
                        </c:choose>
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='xdsj' /></td>
                    <td width="70%" style="border-color: black;"><fmt:formatDate value="${billLading.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='ddzj' /></td>
                    <td width="70%" style="border-color: black;"><fmt:formatNumber value="${billLading.price}" type="CURRENCY"/></td>
                </tr>

                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='shsj' /></td>
                    <td width="70%" style="border-color: black;">
                        <fmt:formatDate value="${billLading.receiptTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                    </td>
                </tr>


                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='shr' /></td>
                    <td width="70%" style="border-color: black;">
                            ${billLading.deliveryName}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='shdz' /></td>
                    <td width="70%" style="border-color: black;">
                            ${billLading.deliveryProvince}${billLading.deliveryCity}${billLading.deliveryArea}${billLading.deliveryAddress}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='shrdh' /></td>
                    <td width="70%" style="border-color: black;">
                            ${billLading.deliveryMobile}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='fhwlgs' /></td>
                    <td width="70%" style="border-color: black;">
                            ${billLading.expressCompany}
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='fhwldh' /></td>
                    <td width="70%" style="border-color: black;">
                            ${billLading.expressesNo}
                    </td>
                </tr>

                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='ddbz' /></td>
                    <td width="70%" style="border-color: black;">
                            ${billLading.note}
                    </td>
                </tr>


                </tbody>
            </table>


            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='zfxx' /></legend>
            </fieldset>

            <table class="layui-table">
                <tbody>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zfzt' /></td>
                    <td width="70%" style="border-color: black;">
                        <c:choose>
                            <c:when test="${billLading.payStatus eq 1}"><fmt:message key='yzf' /></c:when>
                            <c:when test="${billLading.payStatus eq 2}"><fmt:message key='wzf' /></c:when>
                            <c:otherwise>未支付</c:otherwise>
                        </c:choose>
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zffs' /></td>
                    <td width="70%" style="border-color: black;">
                        <c:choose>
                            <c:when test="${billLading.payMethod eq 1}"><fmt:message key='wxzf' /></c:when>
                        </c:choose>
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zfsj' /></td>
                    <td width="70%" style="border-color: black;">
                        <fmt:formatDate value="${billLading.payTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                    </td>
                </tr>
                <tr>
                    <td width="20%" style="background-color:#eaeaea;border-color: black;"><fmt:message key='zflsh' /></td>
                    <td width="70%" style="border-color: black;">
                            ${billLading.payNo}
                    </td>
                </tr>
                </tbody>
            </table>


            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='thqd' /></legend>
            </fieldset>

            <table class="layui-table" lay-size="sm">
                <thead>
                <th style="border-color: black;"><fmt:message key='bh' /></th>
                <th style="border-color: black;"><fmt:message key='sptp' /></th>
                <th style="border-color: black;"><fmt:message key='spmc' /></th>
                <th style="border-color: black;">SKU</th>
                <th style="border-color: black;"><fmt:message key='thsl' /></th>
                </thead>
                <c:forEach items="${billLading.details}" var="detail">
                    <tr>
                        <td style="border-color: black;">${detail.cloudStoreGoods.sku.code}</td>
                        <td style="border-color: black;"><img class="preview" style="width:40px;" src="${store_domain}/uploads/${detail.cloudStoreGoods.goods.defaultImage}"/></td>
                        <td style="border-color: black;">${detail.cloudStoreGoods.goods.name}</td>
                        <td style="border-color: black;">${detail.cloudStoreGoods.sku.skuNames}</td>
                        <td style="border-color: black;">${detail.quantity}</td>
                    </tr>
                </c:forEach>
            </table>


        </form:form>
    </div>
</div>

<script>

    $(function () {

        layui.use(['form', 'laydate'], function () {

            var form = layui.form;
            var laydate = layui.laydate;

        });

    });
</script>
</body>
</fmt:bundle>
</html>